import request from "@/utils/request";
//科室列表
export function hospitalDepartList(data) {
  return request({
    method: "post",
    url: "/waste/hospitalDepart/getList",
    data
  });
}

//科室保存
export function hospitalDepartSave(data) {
  return request({
    method: "post",
    url: "/waste/hospitalDepart/save",
    data
  });
}

//删除科室
export function hospitalDepartRemoce(id) {
  return request({
    method: "delete",
    url: `/waste/hospitalDepart/remove/${id}`
  });
}

//二维码下载
//下载二维码
export function generateQrCode(id) {
  return request({
    method: "get",
    url: `/waste/hospitalDepart/generateQrCode/${id}`,
    responseType: "blob"
  });
}
export function generateQrCodeBatch(data) {
  return request({
    method: "post",
    url: `/waste/hospitalDepart/generateQrCode`,
    responseType: "blob",
    data
  });
}

// /hospitalDepart/downloadTemplate 下载模板
export function downloadTemplate(data) {
  return request({
    method: "get",
    responseType: "blob",
    url: "/waste/hospitalDepart/downloadTemplate"
  });
}

///hospitalDepart/importList 导入科室列表
export function importList(data) {
  return request({
    method: "post",
    url: "/waste/hospitalDepart/importList",
    headers: {
      "Content-Type": "multipart/form-data"
    },
    data
  });
}
